<?php
class PaymentErrorCode {
    //convention [modulecode 3 characters][error code 3 digits]
    const REPAID_AMOUNT_GREATER_CREDIT_AMOUNT   =   "PAY_01";
    const RECEIPT_ALREADY_REPAID                =   "PAY_02";
    const PAYMENT_ITEM_FULL_PAID				=	"PAY_03";
    const CREDIT_ACCOUNT_HAS_NO_MONEY           =   "PAY_04";
    const PATIENT_HAS_NO_PAYMENT_INFO           =   "PAY_05";
    const DELETE_PATIENT_HAVING_PAYMENT_INFO    =   "PAY_06";
    const BILLABLE_ITEM_TYPE_NOT_SUPPORTED      =   "PAY_07";

    public static function getErrorMess($errCode, $input1=null,$input2=null,$input3=null,$input4 = null) {
        switch ($errCode) {
	        case self::REPAID_AMOUNT_GREATER_CREDIT_AMOUNT:
		        return L10nHelper::_("Repaid amount is greater than current balance of patient's credit account");
	        case self::RECEIPT_ALREADY_REPAID:
		        return L10nHelper::_("Receipt already repaid");
	        case self::PAYMENT_ITEM_FULL_PAID:
		        return L10nHelper::_("All the payment items fully paid");
            case self::CREDIT_ACCOUNT_HAS_NO_MONEY:
                return L10nHelper::_("Patient's credit account has no money");
                case self::PATIENT_HAS_NO_PAYMENT_INFO:
                return L10nHelper::_("The patient has no information on payment items");
            case self::DELETE_PATIENT_HAVING_PAYMENT_INFO:
                return L10nHelper::_("Cannot delete patient having payment info");
            case self::BILLABLE_ITEM_TYPE_NOT_SUPPORTED:
                return L10nHelper::_("Billable item type is not supported");
	        default:
                break;
        }

    }
}
?>